<template>
    <div class="homeTopic" v-loading="loading">
        <div class="box">
            <topicList :list="topic.records"/>
        </div>
    </div>
</template>

<script>
    import topicList from '@/components/topic/topicList'
    import { getTopicList } from '@/api/topic'
    export default {
        components : {
            topicList,
        },
        data(){
            return {
                topic : [],
                limit : 1000,
                page : 1,
                loading : false
            }
        },
        created(){
            this.getTopicList()
        },
        methods : {
            getTopicList(){
                this.loading = true
                getTopicList({
                    page : this.page,
                    limit : this.limit,
                    status : 1
                }).then(res => {
                    this.loading = false
                    if(res.code == 200){
                        this.topic = res.data
                    }
                })
            },
        }
    }
</script>

<style lang="scss" scoped>
.homeTopic{
    width: 100%;
    // padding: 20px;
    min-height: 100vh;
//     .box{
//         max-width: 1300px;
//         width: 100%;
//         padding: 20px;
//         margin: 0 auto;
//     }
}
</style>